<?php

/**
 * @package Bike
 * @subpackage User
 */

/**
 * Class for users handling
 * @author Chrome
 * @package Bike
 * @subpackage User
 */
interface Bike_Users_IUser {

	/**
	 * Return anonymous user
	 * @return array
	 */
	public function getAnonymous();
	
	/**
	 * Return current user
	 * @return array
	 */
	public function getCurrentUser();
	
	/**
	 * Return user by id
	 * @param int $id
	 * @return array
	 */
	public function getUserById($id);
	
	/**
	 * Get user by login
	 * @param string $login
	 * @return array
	 */
	public function getUserByLogin($login);
	
	/**
	 * Encode password
	 * @param string $plainTextPassword
	 * @return string
	 */
	public function encodePassword($plainTextPassword);
	
	/**
	 * Authenticate user
	 * @param string $login
	 * @param string $password
	 * @return boolean
	 */
	public function authenticate($login, $password);
	
	/**
	 * Logout user
	 * @return boolean
	 */
	public function logout();
}
